// Learn cc.Class:
//  - https://docs.cocos.com/creator/manual/en/scripting/class.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

cc.Class({
    extends: cc.Component,

    properties: {
        txt:{
            get(){
                let txtNode=this.node.getChildByName('txt');
                return !!txtNode?txtNode.getComponent(cc.Label).string:'';
            },
            set(value){
                let txtNode=this.node.getChildByName('txt');
                if(!!txtNode) txtNode.getComponent(cc.Label).string=value;
            }
        }
    },

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start () {

    },

    // update (dt) {},
});
